package cn.edu.gench.learn.service;

import cn.edu.gench.learn.dao.CityDao;
import cn.edu.gench.learn.model.City;
import cn.edu.gench.learn.model.District;
import cn.edu.gench.learn.model.Province;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/5/17.
 */
@Service
public class CityService {

    @Autowired
    private CityDao cityDao;

    public List<Province> getAll(){
        return cityDao.getAllProvice();
    }


    public List<City> getCityByPid(int pid){
        return cityDao.getCityByPid(pid);
    }


    public List<District> getDistrictByCid(int cid){
        return cityDao.getDistrictByCid(cid);
    }

}
